Skip to content

NUTCH-2887 Migrate to JUnit 5 Jupiter - #861

Merged
lewismc merged 3 commits into
apache:masterfrom
lewismc:NUTCH-2887
Sep 5, 2025
Merged

lewismc merged 3 commits into
apache:masterfrom
lewismc:NUTCH-2887

Conversation

@lewismc

@lewismc lewismc commented Sep 4, 2025

Copy link
Copy Markdown
Member

Whats in this PR?

Phase 1 of NUTCH-2887 which

  1. introduces the JUnit 5 (Jupiter) dependencies including the junit-vintage-engine which allows us to run JUnit 4 tests as we gradually migrate core and plugins to JUnit 5.
  2. replaces the (old) <junit> Ant task with <junitlauncher for the test-core Ant target.

Next steps

Phase 2 - core

  1. Replace all JUnit 4 API usage in core tests with JUnit 5 implementations.
  2. Investigate and use annotations in core tests which will reduce duplicate boilerplate and improve test filtering.

Phase 3 - core

Same as in core above but replace core with plugins.

Questions

  1. Should we decompose this issue into three parts? In my opinion NUTCH-2887 Migrate to JUnit 5 Jupiter #791 ended up a mess and I would like to avoid that happening again. My proposal is therefore to merge this initial PR first. We then then merge phase 2 and finally phase 3. Any thoughts on this approach?
  2. I'm going to also compile a list of out of scope nice to have items I uncover whilst working on this task.

Thanks for any comments. 👍

@lewismc
lewismc marked this pull request as draft September 4, 2025 15:46
@lewismc lewismc self-assigned this Sep 4, 2025
@lewismc
lewismc marked this pull request as ready for review September 5, 2025 03:29
@lewismc

lewismc commented Sep 5, 2025

Copy link
Copy Markdown
Member Author

Phase 1 is ready to test locally. Again, this PR is limited to adjusting the JUnit dependencies and associated Ant configuration in order to have the JUnit 5 engine run the existing JUnit 4 tests in core and plugins. It represents a small start. Thanks.

@sebastian-nagel sebastian-nagel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Tests compile and run locally.

Definitely a good approach to split the implementation into steps. Even smaller steps would be better than nothing, if they are not trivial, for example the tests of parse-tika.

@lewismc
lewismc merged commit 4c04a98 into apache:master Sep 5, 2025
4 checks passed
@lewismc
lewismc deleted the NUTCH-2887 branch September 5, 2025 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants